import render from "./render.js";
import loadata from "./loadata.js";

function HotGoods(){}

$.extend(HotGoods.prototype,{
    init(){
        var $left = $(".left");
        var $mid = $(".mid");
        var $right = $(".right");

        $(".home-hot > .common-section-header").css({
            "background-image": 'url("")'
        })

        loadata.hotGoodsLoad().then(function(res) {
            var html_left = render.init(res.data, "left");
            $left.html(html_left);

            var html_mid = render.init(res.data, "mid");
            $mid.html(html_mid);

            var html_right = render.init(res.data, "right");
            $right.html(html_right);
        })
    }
});

export default new HotGoods();